package com.github.edu.db.manager.config.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-30
 */
@Entity
@Table(name = "T_SYS_TABLE_MANAGER")
public class TSysTableManager implements Serializable {

    private String id;
    private String tableName;
    private Long pageRows;
    private Long formColumns;
    private String formTypes;
    private String isTree;
    private Integer isCreate;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "TABLE_NAME")
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Basic
    @Column(name = "PAGE_ROWS")
    public Long getPageRows() {
        return pageRows;
    }

    public void setPageRows(Long pageRows) {
        this.pageRows = pageRows;
    }

    @Basic
    @Column(name = "FORM_COLUMNS")
    public Long getFormColumns() {
        return formColumns;
    }

    public void setFormColumns(Long formColumns) {
        this.formColumns = formColumns;
    }

    @Basic
    @Column(name = "FORM_TYPES")
    public String getFormTypes() {
        return formTypes;
    }

    public void setFormTypes(String formTypes) {
        this.formTypes = formTypes;
    }

    @Basic
    @Column(name = "IS_TREE")
    public String getIsTree() {
        return isTree;
    }

    public void setIsTree(String isTree) {
        this.isTree = isTree;
    }

    @Basic
    @Column(name = "IS_CREATE")
    public Integer getIsCreate() {
        return isCreate;
    }

    public void setIsCreate(Integer isCreate) {
        this.isCreate = isCreate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TSysTableManager that = (TSysTableManager) o;
        return Objects.equals(tableName, that.tableName) &&
                Objects.equals(pageRows, that.pageRows) &&
                Objects.equals(formColumns, that.formColumns) &&
                Objects.equals(formTypes, that.formTypes) &&
                Objects.equals(isTree, that.isTree);
    }

    @Override
    public int hashCode() {
        return Objects.hash(tableName, pageRows, formColumns, formTypes, isTree);
    }
}
